# == Schema Information
# Schema version: 4
#
# Table name: organizations
#
#  id          :integer         not null, primary key
#  name        :string(255)     
#  description :text            
#  url         :string(255)     
#  city        :string(255)     
#  created_at  :datetime        
#  updated_at  :datetime        
#

class Organization < ActiveRecord::Base
  validates_presence_of :name
  has_many :events
  belongs_to :owner, :class_name => 'User', :foreign_key => 'owner_id'

  
  def self.find_most_active
    find(:all, :limit => 5)
  end
end
